package com.youlu.campus.entity.commission.enums;

/**
 * 分账状态
 *
 */
public enum SharingCommissionProfitStatus {

    UNSETTLED(0, "待结算"),//待结算

    SETTLED(1, "已结算"),//已结算

    CLOSE(2, "关闭"),//关闭

    REFUND(3, "退款"),//退款

    SHARING_PROFIT_GO_BACK(4, "退回")//利润分账已从对方账户退回

    ;

    private final int value;

    private final String msg;


    SharingCommissionProfitStatus(int value, String msg) {
        this.value = value;
        this.msg = msg;
    }

    public int getValue() {
        return this.value;
    }

    public String getMsg() {
        return this.msg;
    }

    public static SharingCommissionProfitStatus getByValue(int value){
        for(SharingCommissionProfitStatus status:SharingCommissionProfitStatus.values()){
            if(status.getValue() ==value){
                return status;
            }
        }
        return null;
    }
}
